<html>
<body>
<div id="header">
<p style="font-family: Times New Roman, serif; font-size: 45pt; padding-top: 17px;">
Listing User Settings
</p>
</div>

<div id="main">
<table>
  <tr>
<!--
    <th>Box Manager |</th>
    <th>Load Box |</th>
    <th>Algorithm |</th>
    <th id="medium">Green Input</th>
-->
    <th id="medium">Power Consumption Preference |</th>
<!--    
    <th id="medium">Utility Control Level </th>
-->     
    <th></th>
    <th></th>
  </tr>

<% @user_settings.each do |user_setting| %>
  <tr>
<!--    <td><%= user_setting.boxmanager_id %></td>
    <td><%= user_setting.loadbox_id %></td>
    <td><%= user_setting.algorithm_id %></td>
    <td id="medium"><%= user_setting.green_input %></td>
-->

<!-- Makes it so that only the words are visible instead of the numbers. -->
    <td id="medium"><%= if user_setting.consumption_preference == 1
    	'Minimum Consumption '
    elsif user_setting.consumption_preference == 2
    	'Low Consumption'
    elsif user_setting.consumption_preference == 3
    	'Moderate Consumption'
    elsif user_setting.consumption_preference == 4
    	'High Consumption'
    elsif user_setting.consumption_preference == 5
    	'Full Consumption'
    end %></td>

    <td id="medium"><%= link_to 'Show', user_setting %></td>
    <td id="medium"><%= link_to 'Edit', edit_user_setting_path(user_setting) %></td>
    <td id="medium"><%= link_to 'Destroy', user_setting, confirm: 'Are you sure?', method: :delete %></td>
  </tr>
<% end %>
</table>

<br />
</div>
<div id="footer">

<%= link_to 'New User Setting', new_user_setting_path %><br /><br />
<p>
User Settings |
<%= link_to 'Utility Settings |', utility_settings_path %>
<%= link_to 'Outlet Statuses', outlet_statuses_path %>

</p>
</div>

</body>
</html>
